package com.example.kotlinExample.repository.es;

import com.example.kotlinExample.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * @author liliang
 */
public interface UserEsRepository extends ElasticsearchRepository<User, Integer> {

    /**
     * 根据名称查询
     * @param name 名称
     * @return 列表
     */
    Page<User> findAllByName(String name, Pageable pageable);
}
